package com.xy.novelweb.dao;

import com.xy.novelweb.domain.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ReaderMapper {

		Reader selectByPrimaryKey(String nick_name);

		int SetUserHeadImg(String imgname, String nick_name);

		int updataReaderByName(Reader reader);

		List<NovelShelf> findBookShelfByName(String nick_name);

		int deletBookShelfById(int id);

		boolean addBookMark(String nick_name, String book_name, String catlogname);

		boolean updateBookMark(String nick_name, String book_name,String catlogname);

		Reader getAllMsg(String nick_name);

		float getReaderBalance(String nickName);

		void addBuyRecord(String nickName, String novelName, String catalogName, String createTime);

		boolean updateBalance(String nickName, float balance);

		void addOrder(String nickName, float price, String createTime, String payType, String remark);

		void addBuyRecords(String nickName, String novelName, String createTime);

		boolean addRechargeRecord(String username,float amount,String rechargeTime,String remark);

		List<ConsumptionRecord>  selectConsumptionByName(String readerName);

		List<ReaderRechargeRecord> selectRechargeByName(String readerName);

		boolean addReaderComment(String readerName,String commentTitle,int commentId);

		int addUserComment(Comment comment);

		boolean addNovelComment(int commentId,String novelName);

		List<Comment> selectReaderComments(String readerName);

		void updatePassword(String nickName, String oldPassword, String newPassword);

		Integer selectReaderByPwd(String nickName, String oldPassword);

		void updateVipLeave(String nickName);
}